package cn.rxls.community.dto.booking;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 预约新增
 */
@Data
public class AddBookingDTO {
    /**
     * 电话
     */
    @NotBlank(message = "电话不为空")
    private String phone;
    /**
     * 称呼
     */
    @NotBlank(message = "称呼不为空")
    private String call;
    /**
     * 地址
     */
    @NotBlank(message = "地址不为空")
    private String address;
    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @NotNull(message = "非法时间")
    @Future(message = "非法时间")
    private Date timer;
}
